package com.lapula.crazyface.entity;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.PointF;

import com.lapula.crazyface.R;
import com.lapula.crazyface.entity.Emotion.ExpressionItem;
import com.lapula.crazyface.entity.Emotion.OffsetRatio;
import com.lapula.crazyface.util.ImageUtils;

public class GlassEmotion extends Emotion {

	private final String expressionFolder = "expression/glass";
	
	public GlassEmotion(Context context) {
		super(context);
	}

	@Override
	protected void init() {
		List<Bitmap> glass = new ArrayList<Bitmap>();
		glass.add(ImageUtils.getImageFromAssetsFile(context, expressionFolder + "/" + "glass_01.png"));
		OffsetRatio leftOffset = new OffsetRatio(-0.5f, -0.5f);
		ExpressionItem glassItem = new ExpressionItem(glass, leftOffset, BASED_POINT_EYE_MIDDLE);
		expressioItems.add(glassItem);

		List<Bitmap> cigarette = new ArrayList<Bitmap>();
		cigarette.add(ImageUtils.getImageFromAssetsFile(context, expressionFolder + "/" + "cigarette_01.png"));
		cigarette.add(ImageUtils.getImageFromAssetsFile(context, expressionFolder + "/" + "cigarette_02.png"));
		cigarette.add(ImageUtils.getImageFromAssetsFile(context, expressionFolder + "/" + "cigarette_03.png"));
		cigarette.add(ImageUtils.getImageFromAssetsFile(context, expressionFolder + "/" + "cigarette_04.png"));
		cigarette.add(ImageUtils.getImageFromAssetsFile(context, expressionFolder + "/" + "cigarette_05.png"));
		cigarette.add(ImageUtils.getImageFromAssetsFile(context, expressionFolder + "/" + "cigarette_06.png"));
		OffsetRatio cigaretteOffset = new OffsetRatio(-0.71f, -0.41f);
		ExpressionItem rightItem = new ExpressionItem(cigarette, cigaretteOffset, BASED_POINT_EYE_MIDDLE);
		expressioItems.add(rightItem);
	}
}
